# !pip install --upgrade paddlepaddle -i https://mirror.baidu.com/pypi/simple --user
# !pip install --upgrade paddlehub -i https://mirror.baidu.com/pypi/simple --user

import paddlehub as hub

lac = hub.Module(name="lac")
test_text = ["简介：立足江苏、立足南京的本地领域观察员 看过生活百态，遍览人间万象，原来，春风十里，不如你。"]

results = lac.cut(text=test_text, use_gpu=False, batch_size=1, return_tag=True)
print(results)
#{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}